win32 theme: Add a naive switch implementation
authorBenjamin Otte <otte@gnome.org>
Wed, 2 Mar 2016 13:48:43 +0000 (14:48 +0100)
committerBenjamin Otte <otte@gnome.org>
Wed, 2 Mar 2016 13:49:37 +0000 (14:49 +0100)
I couldn't come up with anything better than a button on a button.
But the Windows theme sucks...

gtk/theme/win32/gtk-win32-base.css

index 35a2ac6f65bf36a122454b9358b028943b36ed52..e178fabd678a6a05dfd2798be14bbc5ed2657747 100644 (file)
@@ -1202,24 +1202,31 @@ column-header button:active:hover:focus {
 /* Switch */
 
 switch {
-    font: bold condensed 10;
-    color: @text_color;
     background-image: -gtk-win32-theme-part(button, 1, 1);
 }
 
+switch:checked {
+    background-image: -gtk-win32-theme-part(button, 1, 3);
+}
+
 switch:disabled {
     background-image: -gtk-win32-theme-part(button, 1, 4);
 }
 
-switch:active {
+switch slider {
+    background-image: -gtk-win32-theme-part(button, 1, 1);
+}
+
+switch:hover slider {
     background-image: -gtk-win32-theme-part(button, 1, 2);
 }
 
-switch slider {
-    padding: 4px;
-    background-color: transparent;
-    background-image: -gtk-win32-theme-part(scrollbar, 2, 1, over (8, 1));
-    border-width: 0;
+switch:active slider {
+    background-image: -gtk-win32-theme-part(button, 1, 3);
+}
+
+switch:disabled slider {
+    background-image: -gtk-win32-theme-part(button, 1, 4);
 }
 
 /* Menus */